Control Statement Actions
Control statement actions have no target. They are used to control the flow of execution in an action list, and provide a means to create nested action lists. Using these actions along with the state provided by track variables allows you to create more sophisticated event handlers.
Constant descriptions
-
kActionCase
-
Supported Flags: none
Param1: [(CaseStatementActionAtoms)]
-
Provides a conditional control structure. The
CaseStatementActionAtoms
allow for pairs of expressions and actions to be defined. The list of expressions is evaluated, when an expression evaluates to
true
, no other expressions are evaluated and the list of actions associated with that expression is executed.
-
Nested control structures are possible, since they are themselves actions.
-
kActionWhile
-
Supported Flags: none
Param1: [(WhileStatementActionAtoms)]
-
Provides a looping control structure. The
WhileStatementActionAtoms
define an expression and a list of actions to be defined. While the expression still evaluates to
true
, the list of actions is performed.
-
If your list of actions does not contain an action which will eventually cause the expression to evaluate to
false
, the control structure will be caught in an infinite loop. Nested control structures are possible, since they are themselves actions.
-
kConditionalAtomType
-
This atom is used in conjunction with the case and while statement actions. It contains atoms which desribe a Boolean expression and an action list, which is executed on the condition that the Boolean expression evaluates to true.
-
In both cases, this atom is a child atom of the action's only
kActionParameter
atom. The atom contains two child atoms, one of type
kExpressionContainerAtomType
and one of type
kActionListAtomType
.
-
kActionListAtomType
-
This atom is used to contain an action list to be performed by the
kActionCase
and
kActionWhile
actions when an associated expression evaluates to true. In both cases, the atom's parent is of type
kConditionalAtomType
.
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |